﻿using System;
using System.Collections.Generic;
using LuxuryResort.DAO;
using LuxuryResort.Entity;

namespace LuxuryResort.BIZ
{
    public class ReservationBiz : BaseBiz, IReservationBiz
    {
        private readonly ReservationDAO _reserverationDAO = new ReservationDAO();

        public void BookRoom(Reservation r, Guid userId, Guid resortId)
        {
            _reserverationDAO.Insert(r, userId, resortId);
        }

        public List<KeyValuePair<string, Reservation>> GetAll(Guid userId, Guid resortId)
        {
            return _reserverationDAO.GetAll(userId, resortId);
        }

        public List<Reservation> GetReservations(Guid userId, Guid resortId)
        {
            return _reserverationDAO.GetReservations(userId, resortId);
        }


        public void DeleteReservation(Guid reservationId, Guid roomId, Guid userId, Guid resortId)
        {
            _reserverationDAO.DeleteReservation(reservationId, roomId, userId, resortId);
        }


        public void UpdateReservation(Reservation reservation, Guid userId, Guid resortId)
        {
            _reserverationDAO.UpdateReservation(reservation, userId, resortId);
        }
    }
}